/**************************************************************************************
*
*	Copyright (C) 2009 Brent Andrew Chua - See LICENSE.txt for more info.
*		
*	Filename	-	Vector2.h
*
*	Description -	Class containing two dimensional point
*
*	Comments	-	If you don't understand some part of the code, use MSDN!!!
*						Move the cursur to the function/type then hit F1 in VS.
*
*	Modification History:
*			Name			   Date					Description
*			CodeSushi	-	11/26/2009	-	Creation of this file
**************************************************************************************/

#pragma once

#include "../Pulse Lib/Include/Pulse.h"

using namespace Pulse;

struct Vector2
{
	FLOAT x;
	FLOAT y;

	Vector2( void ){ }
	Vector2( FLOAT _x, FLOAT _y ) : x( _x ), y( _y ) { }

	Vector2 operator * ( FLOAT scalar ) { return Vector2( x * scalar, y * scalar ); }

	void operator += ( const Vector2 &vec ) { x += vec.x; y += vec.y; }
	
	void Normalize( void );
	FLOAT Length( void );
};

typedef Vector2 FPoint;